<template>
	<view class="goods_box">
		<view class="goods_title">
			<view class="title">
				全部
			</view>
			<view class="title_summary">
				精选好货
			</view>
		</view>
		<u-empty v-if="list.length==0"></u-empty>
		<view class="goods_list" v-else>
			<GoodsItem @handNavTo='handNavTo(item)' v-for="item in list" :key='item.id' :item="item"></GoodsItem>
		</view>
	</view>
</template>

<script>
	import GoodsItem from '@/components/ZY-Goods-item/ZY-Goods-item.vue'
	export default {
		components: {
			GoodsItem
		},
		props: {
			list: {
				type: Array,
				default: () => []
			}
		},
		data() {
			return {

			};
		},
		methods: {
			handNavTo(item) {
				uni.navigateTo({
					url: '/pages/followShop/goodsDetail/goodsDetail?id=' + item.id
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.goods_box {
		.goods_list {
			padding-left: 20rpx;
		}
	}

	.goods_title {
		background-color: #ECECEC;
		height: 103rpx;
		padding: 0 20rpx;
		display: flex;
		flex-direction: column;
		justify-content: center;
		margin-bottom: 23rpx;

		.title {
			color: $u-type-primary;
		}

		.title_summary {
			width: 100rpx;
			height: 32rpx;
			background-color: $u-type-primary;
			border-radius: 20rpx;
			margin-top: 5rpx;
			font-size: 18rpx;
			color: #fff;
			line-height: 32rpx;
			text-align: center;
		}
	}
</style>
